#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	int max = 0;
	int min = 100;
	int a = 0;
	int count = 0;
	int sum = 0;
	while(scanf("%d",&a)!=EOF)
	{
		int b = 0;
		b++;
		if (a > max)
			max = a;
	    if (a < min)
			min = a;
	    sum += a;
	    count++;
	    if(count==b)
	    {
		 printf("%.2f\n", (sum - max - min )/ 5.0);
		 max = 0;
		 min = 100;
		 sum = 0;
		 count = 0;
	    }
	}
	return 0;
}

